import request from 'utils/request'


export default {
  /**
   * @描述 登陆接口
   * @param username
   * @param password
   * @returns 用户的所有信息
   */
  login(username, password) {
    return request.post('login', {
      username: username,
      password: password
    })
  },
  /**
   * @描述 注册接口
   * @param username
   * @param password
   * @param identifyingCode
   * @returns
   */
  regist(username, password, identifyingCode) {
    return request.post('regist', {
      username: username,
      password: password,
      identifyingCode: identifyingCode
    })
  },
  /**
   * @描述 檢查用戶名是否重複
   * @param username
   * @returns {*}
   */
  userCheck(username){
    return request.get(`user/check/${username}`)
  },

}
